package com.training.java.core.inheritance;

public class Car {
	private String make;
	private String model;
	private int year;
	private int currentSpeed;
	private int maximumSpeed = 140;
	private String color;
	private String vinNumber;
	private boolean started;

	public Car() {

	}

	public Car(String make, String model, int year) {
		super();
		this.make = make;
		this.model = model;
		this.year = year;
	}

	public Car(String make, String model, String color, String vinNumber) {
		this.make = make;
		this.model = model;
		this.color = color;
		this.vinNumber = vinNumber;
	}

	public void start() {
		System.out.println("Car is starting");
		started = true;
		currentSpeed = 0;
	}

	public void stop() {
		System.out.println("Car is stopping");
		started = false;
		currentSpeed = 0;
	}

	public void changeColor(String newColor) {
		color = newColor;
	}

	public void printInformation() {
		System.out.println("Make = " + make);
		System.out.println("Model = " + model);
		System.out.println("Color = " + color);
		System.out.println("Vin Number = " + vinNumber);
	}

	int accelrate(int howMuch) {
		currentSpeed = currentSpeed + howMuch;
		return currentSpeed;
	}

	int acclerate(int howMuch) {
		int wishfulCurrentSpeed = currentSpeed + howMuch;
		if (wishfulCurrentSpeed > maximumSpeed) {
			currentSpeed = maximumSpeed;
		} else {
			currentSpeed = wishfulCurrentSpeed;
		}
		return currentSpeed;
	}

	public String getMake() {
		return make;
	}

	public String getModel() {
		return model;
	}

	public int getYear() {
		return year;
	}

	public int getCurrentSpeed() {
		return currentSpeed;
	}

	public int getMaximumSpeed() {
		return maximumSpeed;
	}

	public String getColor() {
		return color;
	}

	public String getVinNumber() {
		return vinNumber;
	}

	public void setCurrentSpeed(int currentSpeed) {
		this.currentSpeed = currentSpeed;
	}

	public void setColor(String color) {
		this.color = color;
	}

	public void setStarted(boolean started) {
		this.started = started;
	}
}
